﻿using Glorysoft.Auto.Xfw;
using Serilog.Core;
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Glorysoft.EAP.EAPClient
{
    /// <summary>
    /// LogWindow.xaml 的交互逻辑
    /// </summary>
    public partial class LogWindow : Window
    {
        private readonly Logger ServiceLogger = XfwContext.EapLogger;
        public LogWindow()
        {
            InitializeComponent();
        }
        /// <summary>
        /// 设备显示列表实现内容上滚动 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ScrollViewerEqList_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
        {
            try
            {
                var eventArg = new MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta);
                eventArg.RoutedEvent = UIElement.MouseWheelEvent;
                eventArg.Source = sender;
                scrollbar.RaiseEvent(eventArg);
            }
            catch (Exception ex)
            {
                ServiceLogger.Error(ex.InnerException.ToString());
            }
        }
    }
}
